From: Patrick Bader Date: Mon, 4 Mar 2024 15:14:25 +0000 (+0100) Subject: fix: project submodule detection does not work for worktrees X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~14^2~18^2~2244 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5037b9eed711dec0ef73dd6fca1e60e0b521c13b;p=emacs.git fix: project submodule detection does not work for worktrees --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a7c164f5857..7103b36a892 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -602,7 +602,7 @@ See `project-vc-extra-root-markers' for the marker value format.") (goto-char (point-min)) ;; Kind of a hack to distinguish a submodule from ;; other cases of .git files pointing elsewhere. - (looking-at "gitdir: [./]+/\\.git/modules/")) + (looking-at "gitdir: .+/\\.git/\\(worktrees/.*\\)?modules/")) t) (t nil))))